import {Component, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';


@Component({
  selector: 'app-detail',
  templateUrl: './detail.component.html',
  styleUrls: ['./detail.component.scss']
})
export class DetailComponent implements OnInit {

  constructor(public route: ActivatedRoute) {
  }

  ngOnInit(): void {
    console.log(this.route);
    this.route.queryParams.subscribe((data) => {  //get 传值
      console.log(data);
    });
  }

}
